package cn.fzkj.exception;

import java.text.MessageFormat;

public interface BussinessExceptionAssert extends IResponseEnum, Assert {

    @Override
    default BaseException newException(Object... args){
        String msg = MessageFormat.format(this.getMessage(), args);

        return new BussinessException(this, args, msg);
    }

    @Override
    default BaseException newException(Throwable t, Object... args){
        String msg = MessageFormat.format(this.getMessage(), args);

        return new BussinessException(this, args, msg, t);
    }
}
